<extend name="Public:base" />

<block name="content-wrapper">
	<!-- Content Wrapper. Contains page content -->
	<div class="content-wrapper">
		<!-- Content Header (Page header) -->
		<section class="content-header">
			<h1>
				提交我的作业
				<small>Submit My Homework</small>
			</h1>
			<ol class="breadcrumb">
				<li>
					<a href="{:U('Index/index')}"> <i class="fa fa-dashboard"></i>
						首页
					</a>
				</li>
				<li>
					<a href="{:U('MyHomework/index')}">我的作业</a>
				</li>
				<li class="active">提交我的作业</li>
			</ol>
		</section>

		<!-- Main content -->
		<section class="content">
			<div class="row">
				<div class="col-sm-6 col-sm-offset-3">
					<div class="box">
						<div class="box-header with-border">
							<h3 class="box-title">表单</h3>
						</div>
						<!-- /.box-header -->
						<div class="box-body">
							<form id="form-submit" action="{:U('MyHomework/submitPost')}" method="post" enctype="multipart/form-data">
				                <input name="homework_id" id="homework_id" type="hidden" value="{$homework_id}">
				                <div class="form-group">
				                  	<!-- <label>文件</label> -->
				                  	<input name="file" id="file" type="file">
				                  	<p class="help-block">选择你的作业并上传</p>
				                </div>								
							</form>
		              	</div>
						<!-- /.box-body -->
						<div class="box-footer">
							<a href="{:U('MyHomework/index')}" type="button" class="btn btn-default">返回</a>
							<button id="button-submit-submit" type="button" class="btn btn-info pull-right">确定</button>
						</div>
						<!-- /.box-footer -->
					</div>				
				</div>				
			</div>
		</section>
		<!-- /.content -->
	</div>
	<!-- /.content-wrapper -->
</block>

<block name="additional-scripts">
	<script>
		$(function () {
			$('#button-submit-submit').click(function() {
				$('#form-submit').submit();
			});
		});
	</script>
</block>